		TITLE	MVFILNAM - Copyright (c) SLR Systems 1994

		INCLUDE MACROS
		INCLUDE	IO_STRUC

		PUBLIC	MOVE_PATH_PRIM_EXT,MOVE_FILE_LIST_GINDEX_PATH_PRIM_EXT


		.DATA

		EXTERNDEF	_FILE_LIST_GARRAY:STD_PTR_S


		.CODE	ROOT_TEXT

MOVE_FILE_LIST_GINDEX_PATH_PRIM_EXT	PROC
		;
		;ECX IS GINDEX, EAX IS DESTINATION
		;
		PUSH	EDI
		MOV	EDI,EAX
		CONVERT	EDX,ECX,_FILE_LIST_GARRAY

		ASSUME	EDX:PTR FILE_LIST_STRUCT
		MOV	EAX,[EDX].FILE_LIST_PATH_GINDEX
		PUSH	ESI
		TEST	EAX,EAX
		JZ	L5$
		CONVERT	EAX,EAX,_FILE_LIST_GARRAY
		ASSUME	EAX:PTR FILE_LIST_STRUCT

		MOV	ECX,[EAX].FILE_LIST_NFN.NFN_PATHLEN
		LEA	ESI,[EAX].FILE_LIST_NFN.NFN_TEXT
		OPTI_MOVSB
L5$:
		;
		;OUTPUT FILENAME IN ASCII PLEASE
		;FROM [SI] TO [DI]
		;
		MOV	ECX,[EDX].FILE_LIST_NFN.NFN_TOTAL_LENGTH
		LEA	ESI,[EDX].FILE_LIST_NFN.NFN_TEXT
		OPTI_MOVSB
		MOV	EAX,EDI
		POPM	ESI,EDI
		RET

MOVE_FILE_LIST_GINDEX_PATH_PRIM_EXT	ENDP


MOVE_PATH_PRIM_EXT	PROC
		;
		;OUTPUT FILENAME IN ASCII PLEASE
		;FROM [ECX] TO [EAX]
		;
		PUSHM	EDI,ESI
		ASSUME	EAX:PTR NFN_STRUCT,ECX:PTR NFN_STRUCT

		MOV	EDI,EAX
		LEA	ESI,[ECX].NFN_TEXT
		MOV	ECX,[ECX].NFN_TOTAL_LENGTH
		OPTI_MOVSB
		MOV	EAX,EDI
		POPM	ESI,EDI
		RET

MOVE_PATH_PRIM_EXT	ENDP


		END

